Learning Flex Basics (Part 3) : Working with Containers
Table of Contents
- Introduction
- Building the Containers
- Create the Application Object
- Create a Data Array
- Add a TabNavigator Container for Global Navigation
- Add an HBox and Panel Containers for Main Views
- Add a ViewStack, LinkBar, and Panel Containers for Secondary Views
- Add a Form Container
- Add a Tile Layout Container and Populate It Using a Repeater
- Create a Pseudo Bar Chart Using a Repeater and VBoxes
- Complete Code Listing for containers.mxml
- Where to Go from Here
Create a Data Array
In the first tutorial you learn how to create an Array using tag syntax. Here you create one in ActionScript.
-
Inside the Application block, Script block with a CDATA wrapper to prevent the XML parser from trying to interpret the script as XML code:
<mx:Script> <![CDATA[]]> </mx:Script>
-
Inside the Script block, declare a variable called
myArrayof typeArray, and set the values of the array items as[0,1,2,3,4,5,6,7,8,9]:var myArray=[0,1,2,3,4,5,6,7,8,9];